 /*
  * 文件名：Status_.java
  * 版权：Copyright 2014-2020 SIN.BA.DA. Co. Ltd. All Rights Reserved.
  * 描述：辛巴达
  * 修改人：Jinjing
  * 修改时间：2020年03月22日
  * 修改内容：新建
  * 系统名称：辛巴达
  */
 package com.sinbader.xiaole.common.enums;

 /**
  * <一句话功能简述>
  * <功能详细描述>
  *
  * @author Jinjing
  * @version 1.0 2020年03月22日
  * @see Status_
  * @since 1.0
  */
 public abstract class Status_ {


     /**
      * 销售状态  - 仓库是否启用销售 商品 状态
      * - 0 ： 启用
      * 1 ： 停用
      */
     public enum SalesStatus implements LabelizedEnum {
         yes(0), no(1);
         /**
          * 枚举 code
          */
         public static final String ENUM_CODE = "SalesStatus";
         private int id;
         private String name;
         private String label;
         private String messageCode;

         SalesStatus(int value) {
             this.id = value;
             switch (value) {
                 case 0:
                     name = "启用";
                     label = "启用";
                     messageCode = "salesstatus_status_no";
                     break;
                 case 1:
                     name = "停用";
                     label = "停用";
                     messageCode = "salesstatus_status_yes";
                     break;
             }
         }

         @Override
         public String getLabel() {
             return label;
         }

         @Override
         public int getId() {
             return id;
         }

         @Override
         public String getName() {
             return name;
         }

         public void setName(String name) {
             this.name = name;
         }

         @Override
         public String getMessageCode() {
             return messageCode;
         }


         //获取实际值
         public static SalesStatus getInstance(Integer value) {
             if (null != value) {
                 SalesStatus[] values = SalesStatus.values();
                 for (SalesStatus s : values) {
                     if (s.getId() == value.intValue()) {
                         return s;
                     }
                 }
             }
             return yes;
         }
     }


     /**
      * 采购状态  - 仓库是否启用采购商品 状态
      * - 0 ： 启用
      * 1 ： 停用
      */
     public enum ProcurementStatus implements LabelizedEnum {
         yes(0), no(1);
         /**
          * 枚举 code
          */
         public static final String ENUM_CODE = "ProcurementStatus";
         private int id;
         private String name;
         private String label;
         private String messageCode;

         ProcurementStatus(int value) {
             this.id = value;
             switch (value) {
                 case 0:
                     name = "启用";
                     label = "启用";
                     messageCode = "procurementtype_status_no";
                     break;
                 case 1:
                     name = "停用";
                     label = "停用";
                     messageCode = "procurementtype_status_yes";
                     break;
             }
         }

         @Override
         public String getLabel() {
             return label;
         }

         @Override
         public int getId() {
             return id;
         }

         @Override
         public String getName() {
             return name;
         }

         public void setName(String name) {
             this.name = name;
         }

         @Override
         public String getMessageCode() {
             return messageCode;
         }

         //获取实际值
         public static ProcurementStatus getInstance(Integer value) {
             if (null != value) {
                 ProcurementStatus[] values = ProcurementStatus.values();
                 for (ProcurementStatus s : values) {
                     if (s.getId() == value.intValue()) {
                         return s;
                     }
                 }
             }
             return yes;
         }
     }


     /**
      *数据状态：默认为0未删除,1为删除
      */
     public enum IsdeleteEnum implements LabelizedEnum {
         undelete(0), isdelete(1);
         /**
          * 枚举 code
          */
//         public static final String ENUM_CODE = "SalesStatus";
         private int id;
         private String name;
         private String label;
         private String messageCode;

         IsdeleteEnum(int value) {
             this.id = value;
             switch (value) {
                 case 0:
                     name = "未删除";
                     label = "未删除";
                     messageCode = "procurementtype_status_yes";
                     break;
                 case 1:
                     name = "已删除";
                     label = "已删除";
                     messageCode = "procurementtype_status_yes";
                     break;
             }
         }

         @Override
         public String getLabel() {
             return label;
         }

         @Override
         public int getId() {
             return id;
         }

         @Override
         public String getName() {
             return name;
         }

         @Override
         public String getMessageCode() {
             return messageCode;
         }

         public void setName(String name) {
             this.name = name;
         }


         //获取实际值
         public static IsdeleteEnum getInstance(Integer value) {
             if (null != value) {
                 IsdeleteEnum[] values = IsdeleteEnum.values();
                 for (IsdeleteEnum s : values) {
                     if (s.getId() == value.intValue()) {
                         return s;
                     }
                 }
             }
             return undelete;
         }
     }

     /**
      * 启用状态  -
      * - 0 ： 启用
      * 1 ： 停用
      */
     public enum Status implements LabelizedEnum {
         yes(0), no(1);
         /**
          * 枚举 code
          */
         public static final String ENUM_CODE = "Status";
         private int id;
         private String name;
         private String label;
         private String messageCode;

         Status(int value) {
             this.id = value;
             switch (value) {
                 case 0:
                     name = "启用";
                     label = "启用";
                     messageCode = "status_status_yes";
                     break;
                 case 1:
                     name = "禁用";
                     label = "禁用";
                     messageCode = "status_status_no";
                     break;
             }
         }

         @Override
         public String getLabel() {
             return label;
         }

         @Override
         public int getId() {
             return id;
         }

         @Override
         public String getName() {
             return name;
         }

         public void setName(String name) {
             this.name = name;
         }

         @Override
         public String getMessageCode() {
             return messageCode;
         }


         //获取实际值
         public static Status getInstance(Integer value) {
             if (null != value) {
                 Status[] values = Status.values();
                 for (Status s : values) {
                     if (s.getId() == value.intValue()) {
                         return s;
                     }
                 }
             }
             return yes;
         }
     }

     /**
      * 入库状态  -
      *  0 ： 未入库
      * 1 ： 已入库
      */
     public enum InStockStatus implements LabelizedEnum {
         no(0), yes(1);
         /**
          * 枚举 code
          */
         public static final String ENUM_CODE = "Status";
         private int id;
         private String name;
         private String label;
         private String messageCode;

         InStockStatus(int value) {
             this.id = value;
             switch (value) {
                 case 0:
                     name = "未入库";
                     label = "未入库";
                     messageCode = "unInStock";
                     break;
                 case 1:
                     name = "已入库";
                     label = "已入库";
                     messageCode = "InStock";
                     break;
             }
         }

         @Override
         public String getLabel() {
             return label;
         }

         @Override
         public int getId() {
             return id;
         }

         @Override
         public String getName() {
             return name;
         }

         public void setName(String name) {
             this.name = name;
         }

         @Override
         public String getMessageCode() {
             return messageCode;
         }


         //获取实际值
         public static InStockStatus getInstance(Integer value) {
             if (null != value) {
                 InStockStatus[] values = InStockStatus.values();
                 for (InStockStatus s : values) {
                     if (s.getId() == value.intValue()) {
                         return s;
                     }
                 }
             }
             return yes;
         }
     }

     /**
      * 单据状态  -
      *  0 ： 未收货
      * 1 ： 已收货
      */
     public enum OrderStatus implements LabelizedEnum {
         no(0), yes(1);
         /**
          * 枚举 code
          */
         public static final String ENUM_CODE = "Status";
         private int id;
         private String name;
         private String label;
         private String messageCode;

         OrderStatus(int value) {
             this.id = value;
             switch (value) {
                 case 0:
                     name = "未收货";
                     label = "未收货";
                     messageCode = "unOrder";
                     break;
                 case 1:
                     name = "已收货";
                     label = "已收货";
                     messageCode = "InOrder";
                     break;
             }
         }

         @Override
         public String getLabel() {
             return label;
         }

         @Override
         public int getId() {
             return id;
         }

         @Override
         public String getName() {
             return name;
         }

         public void setName(String name) {
             this.name = name;
         }

         @Override
         public String getMessageCode() {
             return messageCode;
         }


         //获取实际值
         public static OrderStatus getInstance(Integer value) {
             if (null != value) {
                 OrderStatus[] values = OrderStatus.values();
                 for (OrderStatus s : values) {
                     if (s.getId() == value.intValue()) {
                         return s;
                     }
                 }
             }
             return yes;
         }
     }
 }
